#include <iostream>
using namespace std;
#include <iomanip>
using std::setw;
#include <cmath>


double acc_e(double n);

int main()
{
	double n;
    cout << "input how many times to acc: \n";
    cin >> n;;
    cout << acc_e(n);
    return 0;
}

double acc_e(double n)
{
	double e=0;
	for(int i=1;i<=n;i++)
	{
		double m=1;
		for(int j=1;j<=i;j++) m*=j; 
		e=e+1/m;
	}
	e=e+1;
	return e;
}
